﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace EquipmentModule.Entity
{
    public class Equipment:BaseEntity,ICloneable
    {
        public string DevId { get; set; }
        public string ProjectId { get; set; }
        //区域id
        public Guid SectionId { get; set; }
        //区域名字
        public string SectionName { get; set; }
        //位置
        public string Location { get; set; }
        //经度
        public double? X { get; set; }
        //纬度
        public double? Y { get; set; }
        //序列号
        public  string SN { get; set; }
        //型号
        public string PN { get; set; }
        //规格
        public string Specification { get; set; }
        //出产地
        public string Origin { get; set; }
        //供货商
        public string Supplier { get; set; }
        //供货时间
        public DateTime? SupplyTime { get; set; }

        public string Url { get; set; }

        public string Token { get; set; }

        public string MachineType { get; set; }
        //检修时间
        public string Maintenance { get; set; }
        //责任人
        public string Operator { get; set; }
        //联系方式
        public string ContractWay { get; set; }
        public string ImageUrl { get; set; }

        //轮询时间
        public int poll { get; set; }
        public object Clone()
        {
            return (Equipment)MemberwiseClone();
        }
    }
    //毫厘接口
    public class Equipment4API
    {
        public string Id { get; set; }
        public string Name { get; set; }
        //经度
        public double Lng { get; set; }
        //纬度
        public double Lat { get; set; }
    }
    //流向仪接口
    public class Respones4FlowChat
    {
        public string Code { get; set; }

        public string Message { get; set; }

        public List<Equipment4FlowChat> Data { get; set; }
        public class Equipment4FlowChat
        {
            public DateTime UpdateDeviceTime { get; set; }
            public string Address { get; set; }

            public string Name { get; set; }
            //经度
            public double X { get; set; }
            //纬度
            public double Y { get; set; }

            public string DeviceId { get; set; }
        }

//        {
//    "code": "200",
//    "message": "获取设备信息成功",
//    "data": [
//        {
//            "updateDeviceTime": "2019-10-14 13:51:26",
//            "address": "武汉市洪山区邮科院路88号",
//            "name": "NB-IoT 窨井一体化测控终端(BJ-S109-0-D) 1093990001",
//            "x": "114.397841",
//            "y": "30.521396",
//            "state": 3,
//            "type": 74,
//            "deviceId": "1093990001"
//        },
//        {
//            "updateDeviceTime": "2020-04-02 12:37:35",
//            "address": "上海市奉贤区扶港路温龙化纤北2",
//            "name": "NB-IoT水浸传感器(BJ-S104)1043020002",
//            "x": "121.45341806941963",
//            "y": "30.98606907373988",
//            "state": 1,
//            "type": 77,
//            "deviceId": "1043020002"
//        },
//        {
//            "updateDeviceTime": "2020-04-02 12:35:48",
//            "address": "上海市奉贤区扶港路温龙化纤北1",
//            "name": "NB-IoT水浸传感器(BJ-S104)1043020001",
//            "x": "121.45340209685988",
//            "y": "30.986165013360573",
//            "state": 1,
//            "type": 77,
//            "deviceId": "1043020001"
//        },
//        {
//            "updateDeviceTime": "2020-07-31 10:28:35",
//            "address": "上海市闵行区江月路",
//            "name": "NB-IoT窨井一体化测控终端(BJ-S109)1093000098",
//            "x": "121.629959",
//            "y": "31.135482",
//            "state": 1,
//            "type": 74,
//            "deviceId": "1093000098"
//        }
//    ]
//}
    }
}
